﻿@using Yglab
@model System.Collections.Generic.IEnumerable<Yglab.Models.Versionn>
@{
    ViewBag.Title = "MakaleAra";
    Layout = "~/Views/Shared/LAYOUT.cshtml";
}

<h2>Makale Ara</h2>

<div id="searchUserForm">
    @using( Html.BeginForm( "MakaleAra" , "Ara" , FormMethod.Get ) ) {   
        <p>
            @Html.TextBox( "Ara" )
            <br />
            <input type="submit" value="Ara" />
        </p>     
    }
</div>

@{
    string Ara = @ViewBag.Ara ?? "Ara Not Set";
   
}




@if( Model != null && Model.Any() ) {
    <table class="gridtable">

        
            <tr>
                <th>Version Numarası</th>
                <th>Başlık</th>
                <th>Makale</th>
                <th>Bilim Dalları</th>
                <th>Kategoriler</th>
                <th>Yazarın İsmi</th>
                <th>Derginin İsmi</th>
            </tr>
       
        


        @foreach( var item in Model ) {
     
            <tr>
                <td>
                   @item.VersionnNo
                </td>
                <td>
                  @item.Title
                </td>
                <td>
                  @item.Abstract
                </td>
                <td>
                    <ul>
                     @foreach( var v in @item.Sciences ) { 
                     <li>

                         @v.Name
                     </li>
                     
                     
                     }
                         
                         
                         
                    </ul>                         

                </td>
                   <td>
                    <ul>
                     @foreach( var v in @item.Subjects ) { 
                     <li>

                         @v.Name
                     </li>
                     
                     
                     }
                         
                         
                         
                    </ul>                         

                </td>
                <td>
                    @item.Article.Author.Name
                </td>
                <td>
                    @item.Article.Journal.Name
                </td>
            </tr>
        }
    </table>
}


